home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
comm
/
ntmler8b.zip
/
NTMAIL.TXT
< prev
next >
Wrap
Text File
|
1996-09-25
|
7KB
|
176 lines
NTMailer .80b
Introduction
------------
First of all, this program is freeware.
NTMailer is a cgi program that runs only on NT based web servers. With no experience
with c/c++ or perl and a little knowledgeof HTML coding, you can write a full fledged
form that will be mailed to anyone you want in about 15 mins! The program has the ability
to mail the information to one or many and allows you to mail the person filling out the message
a canned response.
Features:
---------
-Design template file that has the look and feel of HTML coding.
-Don't need to know a programming language like c/c++ or perl
-All configuration parameters are done within the template file.
-Has required fields with custom required error messages.
-You design how the error html page will look like.
-Can send form contents to to one or many people.
-Can respond to the person with a canned 'thankyou' message or 'I will contact you soon'
-Can send multiple response messages to several people (ie: 'your friend gave me your
e-mail address, you might want to call him and give him a piece of your mind")
-Multiple template files and only one cgi program
-Design your own success page with standard HTML tags.
Remember
--------
As usual, with source code, you may modify it for your own needs, but you cannot redistribute it
unless you have my expressed permission.
Installation
------------
Put blat.exe, gwinsock.dll and ntmailer.exe into your cgi-bin directory.
Template file
-------------
The template file will go into your cgi-bin directory, as well.
<formdata> ->Is where the form variables are processed.
<name=".." ->Name of the form variable
required ->Is the field required or not
requiredErr=".." ->If it is required and they leave the field empty, what is the err msg.
sendto ->Send the results of this form to this e-mail address
respondto ->Send a nice little response message to this person
respondMsg=".." ->If 'respondto' is specified, what should I say?
output=".." ->What text should appear in the e-mail to describe this information
.....
</formdata>
<subject>...</subject> ->e_mail subject line
<smtpserver>...</smtpserver> ->The SMTP Server we will be sending this stuff through.
<sender>...</sender> ->This is the e-mail address that the SMTP Server knows about.
This is more or less like a SMTP Server login name. Just remember,
the server needs to know who this is.
<succeedmsg>...</succeedmsg> ->The message you will say on the next HTML page after they have
successfully filled out this form. You are allow to use any standard
HTML tags here in order to make it pretty.
<errTemplate>...</errTemplate> ->Using standard HTML tags, you can create a sort of template
error page. When you specify $err$, the tag will be replaced
with the actual value specified in 'requiredErr'.
Here are the rules:
1. If you specify a 'required' tag, then you should have a 'requiredErr' tag, otherwise it will provide a
not-so-nice default error response.
2. If you have a 'sendto' tag, you cannot have a 'output' tag.
3. 'sendto' and 'respondto' tags cannot co-exist in a single item.
4. If you have a 'respondto' tag, then you must have a 'respondMsg' tag.
5. Tags are not case sensitive. You can use any case you want. I just like mixing my cases. Habit.
6. The 'sendto' tag will generate a log file (send.log). This is primarily for debugging purposes to make sure the message was sent
7. The 'respondto' tag will generate a log file (respond.log). This is primarily for debugging purposes to make sure the message was sent
Below is an example of a template file as well as the associated HTML form. Learn by example, I always say.
Template file: bugform
--------------
<formdata>
<name="name"
required
requiredErr="Your name is Required. Please enter you name"
output="This is the name:">
<name="send_to"
required
requiredErr="I must have an e-mail address otherwise, who do I send this form to?"
sendto>
<name="e_mail"
required
requiredErr="I need your e-mail address, otherwise I will not know who you are."
respondto
respondmsg="Thanks for the business. Someone will get back to you soon"
output="e_mail address:">
<name="phone"
required
requiredErr="Please enter you phone number."
output="Phone number:">
</formdata>
<subject>SNTrax Web application</subject>
<smtpserver>mail.aracnet.com</smtpserver>
<sender>ivanh@aracnet.com</sender>
<succeedmsg>
<h1><center>Thankyou!</center></h1>
<hr>
Thanks for filling out this form, someone will contact you soon.
<a href="/index.html">Click here </a> to go back to home.
</succeedmsg>
<errTemplate>
<bgcolor="#ffffff">
<br><br><br>
Error occured:<br>
$err$
Please push the back button and fix the problem.
</body>
</errTemplate>
HTML form:
----------
<html>
<head>
<title>Example Form</title>
</head>
<body>
<form action="/cgi-bin/ntmailer.exe?bugform" method="POST">
<h1 align=center>This is a sample form. Give a try.</h1>
<p> </p>
<div align=center><center>
<table>
<tr><td>Name: </td><td><input type=text size=22 maxlength=256 name="name"></td></tr>
<tr><td>Send to:</td><td><select name="send_to" size=1>
<option selected>ivanh@aracnet.com</option>
<option>ivanh@hotmail.com</option>
</select></td></tr>
<tr><td>Your e-mail address:</td><td><input type=text size=20 maxlength=256 name="e_mail"></td></tr>
<tr><td>Phone number:</td><td><input type=text size=12 maxlength=256 name="phone"> </td></tr>
</table>
</center></div>
<p align=center><input type=submit name="Submitme" value="Submit Form"><input type=reset name="Resetme" value="Reset"></p>
</form>
</body>
</html>
I think I have all the rules.
If something is missing, then please tell me.
Ivan Hendricks
ivanh@aracnet.com
Copyright 1996 Ivan Hendricks. All rights reserved
THIS SOFTWARE IS PROVIDED BY IVAN HENDRICKS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.